package com.basic.bio.chat.groupchatdemo;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintStream;
import java.net.Socket;
import java.util.Scanner;

/**
 * @Description:客户端
 * @Author:Zc9741
 * @QQ:516906531
 */
public class Client {
    public static void main(String[] args) throws IOException {
        //创建链接
        Socket socket =new Socket("127.0.0.1",4567);
        System.out.println("官人，人家好了！");
        //创建一个线程用于发送数据
        ClientSendRunnable clientSendRunnable = new ClientSendRunnable(socket);
        new Thread(clientSendRunnable).start();

        //创建一个线程用于接受数据
        ClientReceiveRunnable clientReceiveRunnable = new ClientReceiveRunnable(socket);
        new Thread(clientReceiveRunnable).start();
    }
}
